#ifndef DTWENTYCORE_H
#define DTWENTYCORE_H


#include "dtwentycore_global.h"
#include "campaign.h"
#include "dtwentyitemsmodel.h"


#include <QObject>
#include <QVariant>
#include <QPointer>


class QAbstractItemModel;

class DTWENTYCORESHARED_EXPORT DTwentyCore : public QObject
{
    Q_OBJECT

    Q_PROPERTY(DTwentyItemsModel* skillsModel READ skillsModel WRITE setSkillsModel NOTIFY skillsModelChanged)
    Q_PROPERTY(DTwentyItemsModel* specialAbilitiesModel READ specialAbilitiesModel WRITE setSpecialAbilitiesModel NOTIFY specialAbilitiesModelChanged)
    Q_PROPERTY(DTwentyItemsModel* characterClassesModel READ characterClassesModel WRITE setCharacterClassesModel NOTIFY characterClassesModelChanged)

    DTwentyItemsModel* m_skills;

    DTwentyItemsModel* m_specialAbilities;

    DTwentyItemsModel* m_characterClasses;

public:

    DTwentyCore(QObject* parent = 0);

    void createCampaign();

    DTwentyItemsModel* skillsModel() const;
    DTwentyItemsModel* specialAbilitiesModel() const;
    DTwentyItemsModel* characterClassesModel() const;


public slots:

    void setSkillsModel(DTwentyItemsModel* arg);
    void setSpecialAbilitiesModel(DTwentyItemsModel* arg);
    void setCharacterClassesModel(DTwentyItemsModel* arg);


signals:

    void skillsModelChanged(DTwentyItemsModel* arg);
    void specialAbilitiesModelChanged(DTwentyItemsModel* arg);
    void characterClassesModelChanged(DTwentyItemsModel* arg);


protected:

    inline void setRootFor(QAbstractProxyModel* proxyModel, ModelItem* root);

    QPointer<Campaign> m_campaign;


};




#endif // DTWENTYCORE_H
